Auto merge of #2687 - alexcrichton:panic-abort, r=wycats
authorbors <bors@rust-lang.org>
Sat, 21 May 2016 01:52:38 +0000 (18:52 -0700)
committerbors <bors@rust-lang.org>
Sat, 21 May 2016 01:52:38 +0000 (18:52 -0700)
commit259324cd8f9bb6e1068a3a2b77685e90fda3e3b6
tree9b54efec2f72141f69055d2c1d84c1de1fb2f865
parentf13ca72e52de666e6bb326d6894eb7337258360b
parent75848a2a6972a3de95dd8d0a52ff2cf0443adad7
Auto merge of #2687 - alexcrichton:panic-abort, r=wycats

Implement the `panic` profile option

This is the Cargo half of the implementation of [RFC 1513] which adds a new
`profile.*.panic` option to customize the `-C panic` argument to the compiler.
This is not passed by default and can otherwise be specified as `abort` or
`unwind` on the nightly compiler.

[RFC 1513]: https://github.com/rust-lang/rfcs/pull/1513

The `profile.*.panic` option is *only* used from the top-level crate, not each
crate individually. This means that applications should customize this value as
they see fit, and libraries will only use their own value when they're being
tested.

Cargo also has specific knowledge that when *testing* a crate it can't pass
`-C panic=abort` for now as the default test harness requires `panic=unwind`.
This essentially just means that `cargo test` will continue to work for crates
that specify `panic=abort` in Cargo.toml.
src/cargo/ops/cargo_compile.rs
tests/test_cargo_compile.rs